Integrand size = 26, antiderivative size = 127 \[ \int (d \tan (e+f x))^n (a+i a \tan (e+f x))^3 \, dx=-\frac {a^3 (5+2 n) (d \tan (e+f x))^{1+n}}{d f (1+n) (2+n)}+\frac {4 a^3 \operatorname {Hypergeometric2F1}(1,1+n,2+n,i \tan (e+f x)) (d \tan (e+f x))^{1+n}}{d f (1+n)}-\frac {(d \tan (e+f x))^{1+n} \left (a^3+i a^3 \tan (e+f x)\right )}{d f (2+n)} \]
[Out]
Time = 0.30 (sec) , antiderivative size = 127, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.192, Rules used = {3637, 3673, 3618, 12, 66} \[ \int (d \tan (e+f x))^n (a+i a \tan (e+f x))^3 \, dx=\frac {4 a^3 (d \tan (e+f x))^{n+1} \operatorname {Hypergeometric2F1}(1,n+1,n+2,i \tan (e+f x))}{d f (n+1)}-\frac {a^3 (2 n+5) (d \tan (e+f x))^{n+1}}{d f (n+1) (n+2)}-\frac {\left (a^3+i a^3 \tan (e+f x)\right ) (d \tan (e+f x))^{n+1}}{d f (n+2)} \]
[In]
[Out]
Rule 12
Rule 66
Rule 3618
Rule 3637
Rule 3673
Rubi steps \begin{align*} \text {integral}& = -\frac {(d \tan (e+f x))^{1+n} \left (a^3+i a^3 \tan (e+f x)\right )}{d f (2+n)}+\frac {a \int (d \tan (e+f x))^n (a+i a \tan (e+f x)) (a d (3+2 n)+i a d (5+2 n) \tan (e+f x)) \, dx}{d (2+n)} \\ & = -\frac {a^3 (5+2 n) (d \tan (e+f x))^{1+n}}{d f (1+n) (2+n)}-\frac {(d \tan (e+f x))^{1+n} \left (a^3+i a^3 \tan (e+f x)\right )}{d f (2+n)}+\frac {a \int (d \tan (e+f x))^n \left (4 a^2 d (2+n)+4 i a^2 d (2+n) \tan (e+f x)\right ) \, dx}{d (2+n)} \\ & = -\frac {a^3 (5+2 n) (d \tan (e+f x))^{1+n}}{d f (1+n) (2+n)}-\frac {(d \tan (e+f x))^{1+n} \left (a^3+i a^3 \tan (e+f x)\right )}{d f (2+n)}+\frac {\left (16 i a^5 d (2+n)\right ) \text {Subst}\left (\int \frac {4^{-n} \left (-\frac {i x}{a^2 (2+n)}\right )^n}{-16 a^4 d^2 (2+n)^2+4 a^2 d (2+n) x} \, dx,x,4 i a^2 d (2+n) \tan (e+f x)\right )}{f} \\ & = -\frac {a^3 (5+2 n) (d \tan (e+f x))^{1+n}}{d f (1+n) (2+n)}-\frac {(d \tan (e+f x))^{1+n} \left (a^3+i a^3 \tan (e+f x)\right )}{d f (2+n)}+\frac {\left (i 4^{2-n} a^5 d (2+n)\right ) \text {Subst}\left (\int \frac {\left (-\frac {i x}{a^2 (2+n)}\right )^n}{-16 a^4 d^2 (2+n)^2+4 a^2 d (2+n) x} \, dx,x,4 i a^2 d (2+n) \tan (e+f x)\right )}{f} \\ & = -\frac {a^3 (5+2 n) (d \tan (e+f x))^{1+n}}{d f (1+n) (2+n)}+\frac {4 a^3 \operatorname {Hypergeometric2F1}(1,1+n,2+n,i \tan (e+f x)) (d \tan (e+f x))^{1+n}}{d f (1+n)}-\frac {(d \tan (e+f x))^{1+n} \left (a^3+i a^3 \tan (e+f x)\right )}{d f (2+n)} \\ \end{align*}
Time = 0.72 (sec) , antiderivative size = 75, normalized size of antiderivative = 0.59 \[ \int (d \tan (e+f x))^n (a+i a \tan (e+f x))^3 \, dx=\frac {a^3 \tan (e+f x) (d \tan (e+f x))^n (-3 (2+n)+4 (2+n) \operatorname {Hypergeometric2F1}(1,1+n,2+n,i \tan (e+f x))-i (1+n) \tan (e+f x))}{f (1+n) (2+n)} \]
[In]
[Out]
\[\int \left (d \tan \left (f x +e \right )\right )^{n} \left (a +i a \tan \left (f x +e \right )\right )^{3}d x\]
[In]
[Out]
\[ \int (d \tan (e+f x))^n (a+i a \tan (e+f x))^3 \, dx=\int { {\left (i \, a \tan \left (f x + e\right ) + a\right )}^{3} \left (d \tan \left (f x + e\right )\right )^{n} \,d x } \]
[In]
[Out]
\[ \int (d \tan (e+f x))^n (a+i a \tan (e+f x))^3 \, dx=- i a^{3} \left (\int i \left (d \tan {\left (e + f x \right )}\right )^{n}\, dx + \int \left (- 3 \left (d \tan {\left (e + f x \right )}\right )^{n} \tan {\left (e + f x \right )}\right )\, dx + \int \left (d \tan {\left (e + f x \right )}\right )^{n} \tan ^{3}{\left (e + f x \right )}\, dx + \int \left (- 3 i \left (d \tan {\left (e + f x \right )}\right )^{n} \tan ^{2}{\left (e + f x \right )}\right )\, dx\right ) \]
[In]
[Out]
\[ \int (d \tan (e+f x))^n (a+i a \tan (e+f x))^3 \, dx=\int { {\left (i \, a \tan \left (f x + e\right ) + a\right )}^{3} \left (d \tan \left (f x + e\right )\right )^{n} \,d x } \]
[In]
[Out]
\[ \int (d \tan (e+f x))^n (a+i a \tan (e+f x))^3 \, dx=\int { {\left (i \, a \tan \left (f x + e\right ) + a\right )}^{3} \left (d \tan \left (f x + e\right )\right )^{n} \,d x } \]
[In]
[Out]
Timed out. \[ \int (d \tan (e+f x))^n (a+i a \tan (e+f x))^3 \, dx=\int {\left (d\,\mathrm {tan}\left (e+f\,x\right )\right )}^n\,{\left (a+a\,\mathrm {tan}\left (e+f\,x\right )\,1{}\mathrm {i}\right )}^3 \,d x \]
[In]
[Out]